package com.swallow.auth.infrastructure.convert.auth;

import com.swallow.auth.domain.auth.model.AccountEntity;
import com.swallow.auth.infrastructure.mysql.po.AccountPO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * @author: yangjie.deng@resico.cn
 * @since: 2024-05-13 13:45:24
 * @version: v1.0.0
 * @describe:
 */
@Mapper
public interface CvtAuthRepoMapper {
    CvtAuthRepoMapper INSTANCE = Mappers.getMapper(CvtAuthRepoMapper.class);

    @Mappings({
            @Mapping(source = "username", target = "accountName"),
            @Mapping(source = "password", target = "accountPassword"),
    })
    AccountPO accountEntity2PO(AccountEntity accountEntity);
}
